home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK2.toast / Development Kits (Disc 2) / ScriptX / Draggable ScriptX Folders / utils / DTK / Examples / Custom Classes / findSXKey.fnc < prev    next >
Encoding:
Text File  |  1995-10-27  |  441 b   |  16 lines  |  [TEXT/ttxt]

  1. format debug "--  Compiling findSXKey Function . . .\n" undefined undefined
  2.  
  3. function findSXKey theScript theKey ->
  4. (
  5.     local myKey := ("--SX" + theKey) as string
  6.     local sxOffset := findRange theScript myKey
  7.     if sxOffset = 0 do
  8.         return undefined
  9.     local args := #(theScript,2,sxOffset,999)
  10.     if (findNthContext args @word) then
  11.         return (getRange theScript (args[3]+1) args[4])
  12.     else
  13.         return undefined
  14. )
  15. #(undefined,undefined,#("findSXKey"))
  16.